/* AG was closed so shut down everything we've set up */
if PScr ~= 'WORKBENCH' then do
call CloseScreen(PScr)
call setclip('ARxScreen')
end
/* Turn off the requester port when AG is closed. */
if show('P', 'ARX_REQPORT') then
address 'ARX_REQPORT' 'QUIT'
/* Don't need amigaguide.library for this, so remove it from **
** ARexx list (but probably not from mem.) */
if show('l', 'amigaguide.library') then do
call expungexref()
call remlib('amigaguide.library')
end
end
else do
/* This brings the window, or screen to the front if the guide **
** was already loaded. */
address ARX_GUIDE
if getclip('ARxScreen') > '' then
call ScreenToFront(getclip('ARxScreen'))
'windowtofront'
'ActivateWindow'
end
exit 0
NOCMD:
ERROR:
FAILURE:
call PutErrMsg(SIGL,'Couldn''t run AmigaGuide viewer. Check env:ARexxGuide/AGCmd\or run the setup program again by typing\ rx ARx_Setup\from a shell.')
if show('L', 'amigaguide.library') then do
call expungexref()
call remlib('amigaguide.library')
end
exit 0
/* This uses rexxarplib's GETENV() if it's here */